<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>buffers_suffix</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../index.html" title="Chapter 1. Boost.Beast">
<link rel="up" href="../ref.html" title="This Page Intentionally Left Blank 2/2">
<link rel="prev" href="boost__beast__buffers_prefix_view/end.html" title="buffers_prefix_view::end">
<link rel="next" href="boost__beast__buffers_suffix/value_type.html" title="buffers_suffix::value_type">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="boost__beast__buffers_prefix_view/end.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ref.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="boost__beast__buffers_suffix/value_type.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="beast.ref.boost__beast__buffers_suffix"></a><a class="link" href="boost__beast__buffers_suffix.html" title="buffers_suffix">buffers_suffix</a>
</h4></div></div></div>
<p>
        Adaptor to progressively trim the front of a <span class="emphasis"><em>BufferSequence</em></span>.
      </p>
<h5>
<a name="beast.ref.boost__beast__buffers_suffix.h0"></a>
        <span class="phrase"><a name="beast.ref.boost__beast__buffers_suffix.synopsis"></a></span><a class="link" href="boost__beast__buffers_suffix.html#beast.ref.boost__beast__buffers_suffix.synopsis">Synopsis</a>
      </h5>
<p>
        Defined in header <code class="literal">&lt;<a href="../../../../../../boost/beast/core/buffers_suffix.hpp" target="_top">boost/beast/core/buffers_suffix.hpp</a>&gt;</code>
      </p>
<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span>
    <span class="keyword">class</span> <a class="link" href="../concepts/BufferSequence.html" title="BufferSequence"><span class="emphasis"><em>BufferSequence</em></span></a><span class="special">&gt;</span>
<span class="keyword">class</span> <span class="identifier">buffers_suffix</span>
</pre>
<h5>
<a name="beast.ref.boost__beast__buffers_suffix.h1"></a>
        <span class="phrase"><a name="beast.ref.boost__beast__buffers_suffix.types"></a></span><a class="link" href="boost__beast__buffers_suffix.html#beast.ref.boost__beast__buffers_suffix.types">Types</a>
      </h5>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                <p>
                  Name
                </p>
              </th>
<th>
                <p>
                  Description
                </p>
              </th>
</tr></thead>
<tbody>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__buffers_suffix/const_iterator.html" title="buffers_suffix::const_iterator">const_iterator</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  A bidirectional iterator type that may be used to read elements.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__buffers_suffix/value_type.html" title="buffers_suffix::value_type">value_type</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  The type for each element in the list of buffers.
                </p>
              </td>
</tr>
</tbody>
</table></div>
<h5>
<a name="beast.ref.boost__beast__buffers_suffix.h2"></a>
        <span class="phrase"><a name="beast.ref.boost__beast__buffers_suffix.member_functions"></a></span><a class="link" href="boost__beast__buffers_suffix.html#beast.ref.boost__beast__buffers_suffix.member_functions">Member
        Functions</a>
      </h5>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                <p>
                  Name
                </p>
              </th>
<th>
                <p>
                  Description
                </p>
              </th>
</tr></thead>
<tbody>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__buffers_suffix/begin.html" title="buffers_suffix::begin">begin</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Get a bidirectional iterator to the first element.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__buffers_suffix/buffers_suffix.html" title="buffers_suffix::buffers_suffix">buffers_suffix</a> <span class="silver">[constructor]</span></strong></span>
                </p>
              </td>
<td>
                <p>
                  Constructor. <br> <span class="silver">—</span><br> Copy
                  Constructor.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__buffers_suffix/consume.html" title="buffers_suffix::consume">consume</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Remove bytes from the beginning of the sequence.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__buffers_suffix/end.html" title="buffers_suffix::end">end</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Get a bidirectional iterator to one past the last element.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__buffers_suffix/operator_eq_.html" title="buffers_suffix::operator=">operator=</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Copy Assignment.
                </p>
              </td>
</tr>
</tbody>
</table></div>
<h5>
<a name="beast.ref.boost__beast__buffers_suffix.h3"></a>
        <span class="phrase"><a name="beast.ref.boost__beast__buffers_suffix.description"></a></span><a class="link" href="boost__beast__buffers_suffix.html#beast.ref.boost__beast__buffers_suffix.description">Description</a>
      </h5>
<p>
        This adaptor wraps a buffer sequence to create a new sequence which may be
        incrementally consumed. Bytes consumed are removed from the front of the
        buffer. The underlying memory is not changed, instead the adaptor efficiently
        iterates through a subset of the buffers wrapped. The wrapped buffer is not
        modified, a copy is made instead. Ownership of the underlying memory is not
        transferred, the application is still responsible for managing its lifetime.
      </p>
<h5>
<a name="beast.ref.boost__beast__buffers_suffix.h4"></a>
        <span class="phrase"><a name="beast.ref.boost__beast__buffers_suffix.template_parameters"></a></span><a class="link" href="boost__beast__buffers_suffix.html#beast.ref.boost__beast__buffers_suffix.template_parameters">Template
        Parameters</a>
      </h5>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                <p>
                  Type
                </p>
              </th>
<th>
                <p>
                  Description
                </p>
              </th>
</tr></thead>
<tbody><tr>
<td>
                <p>
                  <code class="computeroutput"><span class="identifier">BufferSequence</span></code>
                </p>
              </td>
<td>
                <p>
                  The buffer sequence to wrap.
                </p>
              </td>
</tr></tbody>
</table></div>
<h5>
<a name="beast.ref.boost__beast__buffers_suffix.h5"></a>
        <span class="phrase"><a name="beast.ref.boost__beast__buffers_suffix.example"></a></span><a class="link" href="boost__beast__buffers_suffix.html#beast.ref.boost__beast__buffers_suffix.example">Example</a>
      </h5>
<p>
        This function writes the entire contents of a buffer sequence to the specified
        stream.
      </p>
<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">SyncWriteStream</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">ConstBufferSequence</span><span class="special">&gt;</span>
<span class="keyword">void</span> <span class="identifier">send</span><span class="special">(</span><span class="identifier">SyncWriteStream</span><span class="special">&amp;</span> <span class="identifier">stream</span><span class="special">,</span> <span class="identifier">ConstBufferSequence</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">buffers</span><span class="special">)</span>
<span class="special">{</span>
    <span class="identifier">buffers_suffix</span><span class="special">&lt;</span><span class="identifier">ConstBufferSequence</span><span class="special">&gt;</span> <span class="identifier">bs</span><span class="special">{</span><span class="identifier">buffers</span><span class="special">};</span>
    <span class="keyword">while</span><span class="special">(</span><span class="identifier">buffer_bytes</span><span class="special">(</span><span class="identifier">bs</span><span class="special">)</span> <span class="special">&gt;</span> <span class="number">0</span><span class="special">)</span>
        <span class="identifier">bs</span><span class="special">.</span><span class="identifier">consume</span><span class="special">(</span><span class="identifier">stream</span><span class="special">.</span><span class="identifier">write_some</span><span class="special">(</span><span class="identifier">bs</span><span class="special">));</span>
<span class="special">}</span>
</pre>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2016-2019 Vinnie
      Falco<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="boost__beast__buffers_prefix_view/end.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ref.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="boost__beast__buffers_suffix/value_type.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
